<style scoped>
  .register{
    height:100%;
    background: #edf1f5;
  }
  .header{
    display: flex;
    flex-direction: column;
  }
  .head-top{
    width:100%;
    height:10px;
    background: transparent;
  }
  .head{
    height:50px;
    display: flex;
    justify-content: center;
    align-items:center;
    border-bottom: 1px solid #E9E9E9;
    box-sizing: border-box;
    background: #ffffff;
  }
  .head-left{
    position: absolute;
    width:40px;
    height:100%;
    left:0;
    top:0;
    color: #7f7a8e;
    text-align: center;
  }
  .head-left h1{
    margin-top: 22px;
  }
  .head-middle{
    font-size: 16px;
  }
  .head-right{
    position: absolute;
    right:10px;
    top:15px;
  }
  .fasong{
    margin-bottom: 10px;
  }
  .content{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    /*height:100%;*/
  }
  .input{
    width:100%;
  }
  .input>div{
    margin:0 5%;
  }
  .input>div>.zhmm{
    background: #ffffff;
    border-radius: 10px;
  }
  .input>div>.zhmm>div{
    display: flex;
    align-items: center;
  }
  .input>div>.zhmm>div>label{
    flex: 2;
    display: flex;
    justify-content: center;
    align-items:center;
  }
  .input>div>.zhmm>div>input{
    flex: 5;
    display: flex;
    align-items: center;
    height:80%;
  }
  .input>div>.zhmm>div>p{
    flex: 2;
    height:100%;
    background: #4D66FF;
    border-radius: 4px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .input>div>.zhmm>div.name{
    border-bottom: 1px solid #e9e9e9;
    box-sizing: border-box;
  }
  .submit{
    margin-top: 30px;
    border-radius: 10px;
    background: #4D66FF;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .submit h3{
    color: #ffffff;
  }
  @media screen and (max-width: 320px) {
    .input>div>.zhmm>div{
      height:43px;
    }
    .submit{
      height:43px;
    }
  }
  @media screen and (max-width:375px) and (min-width:321px) {
    .input>div>.zhmm>div{
      height:50px;
    }
    .submit{
      height:50px;
    }
  }
  @media screen and (min-width: 376px){
    .input>div>.zhmm>div{
      height:60px;
    }
    .submit{
      height:60px;
    }
  }
  .confirm{
    display: flex;
    justify-content: center;
    margin-top: 8px;
  }
</style>

<template>
  <div class="register" ref="nana">
    <div class="header">
      <div class="head-top"></div>
      <div class="head">
        <div class="head-left" @click="goBack"><h1 class="iconfont icon-xiangzuo1"></h1></div>
        <div class="head-middle"><h3>注册账户</h3></div>
      </div>
    </div>
    <div class="content">
      <div class="input">
        <div>
          <div class="fasong" v-show="isShow">
            <p>已发送短信验证码+86 123455678901</p>
          </div>
          <div class="zhmm">
            <div class="password">
              <label>验证码</label>
              <input type="text" placeholder="请输入登录验证码">
              <p @click="send">发送验证码</p>
            </div>
          </div>
          <div class="submit">
            <button><h3>确认注册</h3></button>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  import axios from 'axios'
  import host from '../config.js'

  export default {
    data () {
      return {
        isShow: false
      }
    },
    mounted () {
      let h = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
      let h1 = h
      this.$refs.nana.style.height = h1 + 'px'
    },
    methods: {
      goBack () {
        this.$router.go(-1)
      },
      send () {
        axios({
          method: 'post',
          url: host.host + "/api/usr/verifyCode"
        }).then(function (data) {
          console.log(data)
        })
      }
    }
  }
</script>
